import request from '~/utils/request'

export default{
  // 创建一个收藏
  createCollect(courseId) {
    return request({
      url: `/api/edu/course-collect/auth/create/${courseId}`,
      method: 'post'
    })
  },
  // 删除一个收藏
  delCollect(courseId) {
    return request({
      url: `/api/edu/course-collect/auth/delete/${courseId}`,
      method: 'delete'
    })
  },
  // 查询这个用户全部的收藏
  findAllCollect() {
    return request({
      url: `/api/edu/course-collect/auth/findAllByMemberId`,
      method: 'get'
    })
  },
  // 这个课程是否已收藏
  existCollect(courseId) {
    return request({
      url: `/api/edu/course-collect/auth/ifCollect/${courseId}`,
      method: 'get'
    })
  },
}
